<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/report/report.js"></script>
  </head>
  <body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
	            <dl>
					<dt>举报人：</dt>
					<dd>
						<input name="creatorName" id="creatorName" type="text" class="txt" maxlength="16"/>
					</dd>
				</dl>
				<dl>
					<dt>内容：</dt>
					<dd>
						<input name="content" id="content" type="text" class="txt" maxlength="16"/>
					</dd>
				</dl>
				<%-- <dl>
					<dt>状态：</dt>
					<dd>
						<app:dictSelect name="status" cssClass="txt grid-20" dictType="report_status" all="true"/>
					</dd>
				</dl>
				<dl>
					<dt>业务模块：</dt>
					<dd>
						<app:dictSelect name="bussType" cssClass="txt grid-20" dictType="report_bussType" all="true"/>
					</dd>
				</dl>
				<dl>
					<dt>举报理由：</dt>
					<dd>
						<app:dictSelect name="reason" cssClass="txt grid-20" dictType="report_reason" all="true"/>
					</dd>
				</dl>
				<dl>
	            	<dt>举报时间：</dt>
	                <dd><input name="startCreateAtStr" id="startCreateAtStr" type="text" class="txt easyui-datetimebox"  editable="false" maxlength="19"/> - 
	                	<input name="endCreateAtStr" id="endCreateAtStr" type="text" class="txt easyui-datetimebox"  editable="false" maxlength="19"/>
	                </dd>
            	</dl> --%>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.report.query()" />
	            </p>
	        </form>
	  	</div>
	    <div data-options="region:'center',border:false">
		    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/pub/report/list',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'bizzType',width:80,align:'center',
						formatter:function(value,row,index) {
	                        var l_html = '';
	                        if (row.bizzType=='AA') {
	                        	l_html = '友事';
	                        }else if(row.bizzType=='BA'){
	                            l_html = '圈子话题';
	                        }else if(row.bizzType=='CA'){
	                            l_html = '社区大喇叭';
	                        }else if(row.bizzType=='F'){
	                            l_html = '交易信息';
	                        }else if(row.bizzType=='G'){
	                            l_html = '活动';
	                        }
	                        return l_html;
						}">业务模块</th>
						<th data-options="field:'communityName',width:100,align:'center' ">社区</th>
						<th data-options="field:'creatorName',width:80,align:'center' ">举报人</th>
			            <th data-options="field:'content',width:300,align:'center'">内容</th>
						<th data-options="field:'reason',width:80,align:'center',
						formatter:function(value,row,index) {
	                        var l_html = '';
	                        if (row.reason==1) {
	                        	l_html = '色情低俗';
	                        }else if(row.reason==2){
	                            l_html = '欺诈骗钱';
	                        }else if(row.reason==3){
	                            l_html = '广告骚扰';
	                        }else if(row.reason==4){
	                            l_html = '政治敏感';
	                        }else if(row.reason==5){
	                            l_html = '暴力违法';
	                        }
	                        return l_html;
						}">举报理由</th>
						<th data-options="field:'strNewAt',width:120,align:'center'">举报时间</th>
						<th data-options="field:'status',width:80,align:'center',
						formatter:function(value,row,index) {
	                        var l_html = '待处理';
	                        if (row.status==2) {
	                        	l_html = '已处理';
	                        }
	                        return l_html;
						}">状态</th>
			            <th data-options="field:'id',align:'center',width:150,formatter:formatOperation">管理操作</th>
					</tr>
				</thead>
			</table>
	  	</div>
	</div>

	<script>


		function formatOperation(value,row,index) {
			var l_html = '';
			l_html += '<a href="javascript:;" class="table_link" onclick="admin.report.detail('+row.id+')">查看</a>';
			//var param = row.id+','+row.bizzId+',\''+row.bizzType+'\';
			if(row.status==1){
				l_html+='<a href="javascript:void(0)" class="table_link" onclick="admin.report.setIsShow('+row.id+','+row.bizzId+',\''+row.bizzType+'\',false)">屏蔽</a>';
			}else if(row.status==2){
				l_html+='<a href="javascript:void(0)" class="table_link" onclick="admin.report.setIsShow('+row.id+','+row.bizzId+',\''+row.bizzType+'\',true)">解除屏蔽</a>';
			}
			return l_html;
		}
	</script>
  </body>
</html>
